package com.finance.report.dao;

import com.finance.framework.lang.Page;
import com.finance.report.bean.pojo.LogisticsDataView;
import com.finance.report.bean.pojo.ManSalary;
import com.finance.report.bean.pojo.ManSalaryDetail;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface ManSalaryMapper {

    List<ManSalary> listByPage(Page page);

    List<Map<String,Object>> listSalaryByPage(Page page);

    List<ManSalary> listAll(String salaryMonth);

    ManSalary getByUserCode(@Param("userCode")String userCode,@Param("salaryMonth") String salaryMonth);

    List<LogisticsDataView> getOrdersDetails(Page page);

    List<ManSalaryDetail> getSalaryDetails(@Param("userCode") String userCode, @Param("salaryMonth") String salaryMonth);

    ManSalaryDetail getBySupplierCode(@Param("userCode")String userCode,@Param("salaryMonth") String salaryMonth,@Param("supplierCode") String supplierCode);

    int addManSalary(ManSalary manSalary);

    int updateManSalary(ManSalary manSalary);

    int addManSalaryDetail(ManSalaryDetail manSalaryDetail);

    int updateSalaryDetail(ManSalaryDetail manSalaryDetail);

    int delSalaryByMonth(String salaryMonth);

    int delSalaryDetailByMonth(String salaryMonth);

    ManSalary getByUserCodeForLock(String userCode, String salaryMonth);

    int saveOrUpdateManSalary(ManSalary manSalary);

    ManSalary getByUserCodeRandom(@Param("userCode")String userCode,@Param("salaryMonth") String salaryMonth,@Param("random") int random);
}